package org.eclipse.jet.internal.taglib;

import java.util.HashMap;
import java.util.Map;

import org.eclipse.jet.JET2Context;

public class ConditionValue{

  private static Map<Object, Boolean> ognlStacks = new HashMap<Object, Boolean>();

  public static void put(Object object, Boolean value){
    
    if(!ognlStacks.containsKey(object)){
      if(object instanceof JET2Context){
        ognlStacks.clear();
      }
    }
    ognlStacks.put(object, value);
  }

  public static Boolean get(Object object){
    return ognlStacks.get(object);
  }
  
  public static void remove(Object object){
    if(!ognlStacks.containsKey(object)){
      ognlStacks.remove(object);
    }
  }

}
